package com.fa4j.system.settings.repository.impl;

import com.fa4j.common.data.repository.impl.BaseRepositoryImpl;
import com.fa4j.system.settings.model.Settings;
import com.fa4j.system.settings.repository.SettingsRepository;
import com.fa4j.system.settings.repository.mapper.SettingsMapper;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 系统设置 持久化接口
 *
 * @since 2025-06-20 15:55:41
 */
@Repository
public class SettingsRepositoryImpl extends BaseRepositoryImpl<SettingsMapper, Settings> implements SettingsRepository {

    @Override
    public Optional<Settings> findByCode(String code) {
        return super.lambdaQuery().eq(Settings::getCode, code).oneOpt();
    }
}
